<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:calli="http://callimachusproject.org/rdf/2009/framework#">
<head>
    <title resource="?this">{rdfs:label}</title>
    <link rel="help" href="../../callimachus-for-web-developers#Digest_Password_Authentication" target="_blank" title="Help" />
</head>
<body resource="?this">
    <h1 property="rdfs:label" />
    <div id="sidebar">
        <aside>
            <p>The Auth name is used to salt passwords, changing it requires all users to reset their password</p>
            <p>Only users in the User namespace folder are permitted to authenticate</p>
        </aside>
    </div>
    <form role="form" id="form" method="POST" action="" enctype="application/sparql-update" resource="?this">
        <fieldset>
            <div class="form-group">
                <label for="label">Label</label>
                <div class="controls">
                    <input type="text" id="label" class="form-control" value="{rdfs:label}" />
                </div>
            </div>
            <div class="form-group">
                <label for="name">Auth name</label>
                <div class="controls">
                    <input type="text" id="name" class="form-control" value="{calli:authName}" />
                </div>
            </div>
            <div id="authNamespace" dropzone="link s:text/uri-list" class="form-group" ondrop="return calli.insertResource(event)">
                <label for="authNamespace">User folder</label>
                <div rel="calli:authNamespace" class="controls">
                    <span resource="?authNamespace" typeof="calli:Folder" class="ui-state-highlight ui-corner-all">
                        <span property="rdfs:label" />
                        <a href="{?authNamespace}" title="Don't use users in this folder" onclick="return calli.removeResource(event)" class="glyphicon glyphicon-remove" />
                    </span>
                </div>
            </div>
            <div class="form-group">
                <label for="comment">Comment</label>
                <div class="controls">
                    <textarea id="comment" class="form-control">{rdfs:comment}</textarea>
                </div>
            </div>
            <div class="form-group">
                <button id="save" type="submit" class="btn btn-primary">Save</button>
                <button id="cancel" type="button" onclick="window.location.replace('?view')" class="btn btn-default">Cancel</button>
                <button id="delete" type="button" onclick="calli.deleteResource(event)" class="btn btn-danger">Delete</button>
            </div>
        </fieldset>
    </form>
</body>
</html>
